require 'devise-encryptable'
require "digest/sha1"

module Devise
  module Encryptable
    module Encryptors
      class TrustieAuthenticate < Base
        def self.digest(password, stretches, salt, pepper)
          string_to_hash = "#{salt}#{Digest::SHA1.hexdigest(password)}"
          Digest::SHA1.hexdigest(string_to_hash)
        end
      end
    end
  end
end

